import React from 'react'
import Viewer from 'react-viewer';
import 'react-viewer/dist/index.css';

interface PropsInterfave {
  visible: boolean
  images: Array<string>,
  onClose: () => void
}

export default function (props: PropsInterfave) {

  const images = props.images.map((item: string) => {
    return { src: item }
  })

  return (
    <Viewer
      visible={props.visible}
      images={images}
      onClose={ props.onClose }
    />
  )
}